<?php


class RefundEnum
{

    public static function status()
    {
        return [
            'NONE'    => '未还款',
            'READY'   => '准备还款',
            'SUCCESS' => '已还款',
        ];
    }




    /**
     * 按月付息
     */
    public static function accrual($itemid)
    {
        // 找到标的
        $itemTable = table('item\\Item');
        $itemWhere = [
            'auto_id' => $itemid,
            'status'  => 'REPAYING',
        ];

        $item = $itemTable->where($itemWhere)->find();

        if (!$item)
        {
            returned(404, '未找到此还款中标的，ID:'.$itemid);
        }

    }


}
